<?php
/**
 * 入口主页
 * 
 * 
 * @author suing <snsnsky@gmail.com>
 * 
 * $Id$
 */

define('SITE_AUTH','welcome');

require('../common.inc.php');



class main extends lib\core\AdminAction
{
    /**
     * 程序入口
     *
     */
    public function doDefault()
    {
        $smarty = $this->app->page();
        
        //客户端IP
        $smarty->value('remote_addr', $this->app->ip());
        
        //服务器IP
        $server_addr = $_SERVER['SERVER_ADDR'];
        $smarty->value('server_addr', $server_addr);
        
        //操作系统版本
        $php_uname = php_uname();
        $smarty->value('php_uname', $php_uname);
        
        //PHP版本
        $php_version = PHP_VERSION;
        $smarty->value('php_version', $php_version);
        
        //当前时间
        $date = date("Y年m月d日 H:i:s");
        $smarty->value('date', $date);

        $smarty->value('ddir', ADMIN_ROOT_PATH);
        
        $smarty->params['template'] = 'main.tpl';
        $smarty->output();
    }
}
$app->run();

?>